import request from '@/utils/request'

export interface Dict {
  createBy: null | string
  createTime: null | string
  dictCode: number
  dictLabel: string
  dictSort: number
  dictType: string
  dictValue: string | number
  remark: null | string
  status: string | number
  updateBy: null
  updateTime: null
}

// 字典信息
export const getDict = async (dictType: string) => {
  return await request.get<Dict[]>(`/system/dict/data/type/${dictType}`)
}

// 字典信息
export const getDefectAllDict = async () => {
  return await request.get<Dict[]>(`/system/dict/data/type/all`)
}
